package com.lupan.spring.data.jpa.dao;

import com.lupan.classicsJava.jpa.domain.Student;
import com.lupan.spring.data.jpa.domain.StudentPojo;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

/**
 * 说明：
 *
 * @author lupan
 * @version 2017/3/10 13:50
 */
public interface StudentDao extends CrudRepository<Student, Long> {
    @Query(value = "select name , num from student ",nativeQuery = true)
    public List<StudentPojo> get();
}
